.class public Lnbisdk/rw;
.super Lnbisdk/ct;


# instance fields
.field private cp:Lcom/nbi/location/Location;

.field private yP:Lnbisdk/v;

.field private yQ:Lcom/nbi/common/NBIContext;

.field private yR:Lnbisdk/fv;

.field private yS:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lnbisdk/rm;",
            ">;"
        }
    .end annotation
.end field

.field private yT:Z

.field private yU:Ljava/lang/Runnable;

.field private yV:Lnbisdk/qk;

.field private yW:Lnbisdk/da;


# direct methods
.method public constructor <init>()V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0}, Lnbisdk/ct;-><init>()V

    iput-object v1, p0, Lnbisdk/rw;->yP:Lnbisdk/v;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/rw;->yT:Z

    iput-object v1, p0, Lnbisdk/rw;->cp:Lcom/nbi/location/Location;

    new-instance v0, Lnbisdk/nd;

    invoke-direct {v0, p0}, Lnbisdk/nd;-><init>(Lnbisdk/rw;)V

    iput-object v0, p0, Lnbisdk/rw;->yU:Ljava/lang/Runnable;

    return-void
.end method

.method static synthetic a(Lnbisdk/rw;)Lcom/nbi/location/Location;
    .locals 1

    iget-object v0, p0, Lnbisdk/rw;->cp:Lcom/nbi/location/Location;

    return-object v0
.end method


# virtual methods
.method public final bl()Z
    .locals 17

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yQ:Lcom/nbi/common/NBIContext;

    move-object v2, v0

    if-eqz v2, :cond_0

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->el:Lcom/nbi/location/LocationListener;

    move-object v2, v0

    if-nez v2, :cond_1

    :cond_0
    const/4 v2, 0x0

    :goto_0
    return v2

    :cond_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yP:Lnbisdk/v;

    move-object v2, v0

    if-nez v2, :cond_2

    new-instance v2, Lnbisdk/v;

    move-object v0, v2

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lnbisdk/v;-><init>(Lcom/nbi/location/LocationListener;)V

    move-object v0, v2

    move-object/from16 v1, p0

    iput-object v0, v1, Lnbisdk/rw;->yP:Lnbisdk/v;

    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yP:Lnbisdk/v;

    move-object v2, v0

    if-nez v2, :cond_3

    const/4 v2, 0x0

    goto :goto_0

    :cond_3
    invoke-virtual/range {p0 .. p0}, Lnbisdk/rw;->jO()Z

    move-result v2

    const/4 v3, 0x1

    if-ne v2, v3, :cond_4

    const/4 v2, 0x1

    goto :goto_0

    :cond_4
    new-instance v2, Lnbisdk/fv;

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yQ:Lcom/nbi/common/NBIContext;

    move-object v3, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yP:Lnbisdk/v;

    move-object v4, v0

    invoke-direct {v2, v3, v4}, Lnbisdk/fv;-><init>(Lcom/nbi/common/NBIContext;Lnbisdk/v;)V

    move-object v0, v2

    move-object/from16 v1, p0

    iput-object v0, v1, Lnbisdk/rw;->yR:Lnbisdk/fv;

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    move-object v2, v0

    if-eqz v2, :cond_5

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    if-nez v2, :cond_6

    :cond_5
    const/4 v2, 0x0

    move v3, v2

    :goto_1
    if-nez v3, :cond_11

    const/16 v2, 0x2346

    move-object/from16 v0, p0

    move v1, v2

    invoke-virtual {v0, v1}, Lnbisdk/rw;->onLocationError(I)V

    const/4 v2, 0x0

    goto :goto_0

    :cond_6
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fq()I

    move-result v2

    const/4 v3, 0x2

    if-ne v2, v3, :cond_c

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fr()Lnbisdk/cb;

    move-result-object v10

    if-nez v10, :cond_7

    const/4 v2, 0x0

    move v3, v2

    goto :goto_1

    :cond_7
    invoke-virtual {v10}, Lnbisdk/cb;->bU()I

    move-result v2

    const/4 v3, -0x1

    if-ne v2, v3, :cond_8

    invoke-virtual {v10}, Lnbisdk/cb;->bT()I

    move-result v2

    const/4 v3, -0x1

    if-ne v2, v3, :cond_8

    invoke-virtual {v10}, Lnbisdk/cb;->bS()I

    move-result v2

    const/4 v3, -0x1

    if-ne v2, v3, :cond_8

    const/4 v2, 0x0

    move v3, v2

    goto :goto_1

    :cond_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fr()Lnbisdk/cb;

    move-result-object v2

    if-nez v2, :cond_9

    const/4 v2, 0x0

    move v3, v2

    goto :goto_1

    :cond_9
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    move-object v3, v0

    invoke-virtual {v3, v2}, Lnbisdk/fv;->a(Lnbisdk/eo;)V

    sget-boolean v2, Lnbisdk/bk;->cG:Z

    if-eqz v2, :cond_b

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fr()Lnbisdk/cb;

    move-result-object v2

    invoke-static {v2}, Lnbisdk/cq;->a(Lnbisdk/cb;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v2, v0

    if-eqz v2, :cond_b

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/da;->getWifiState()I

    move-result v2

    const/4 v3, 0x2

    if-ne v2, v3, :cond_b

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/da;->cv()Ljava/util/Vector;

    move-result-object v2

    move-object v0, v2

    move-object/from16 v1, p0

    iput-object v0, v1, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object v2, v0

    if-eqz v2, :cond_b

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object v2, v0

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v11

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object v2, v0

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v12

    :cond_a
    :goto_2
    invoke-interface {v12}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_b

    invoke-interface {v12}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    move-object v0, v2

    check-cast v0, Lnbisdk/rm;

    move-object v8, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/da;->ct()J

    move-result-wide v2

    const-wide/16 v4, 0x0

    cmp-long v2, v2, v4

    if-eqz v2, :cond_a

    invoke-virtual {v10}, Lnbisdk/cb;->bS()I

    move-result v2

    invoke-virtual {v10}, Lnbisdk/cb;->bT()I

    move-result v3

    invoke-virtual {v10}, Lnbisdk/cb;->bU()I

    move-result v4

    invoke-virtual {v10}, Lnbisdk/cb;->eu()I

    move-result v5

    int-to-byte v6, v11

    invoke-virtual {v8}, Lnbisdk/rm;->getMacAddress()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v8}, Lnbisdk/rm;->kS()I

    move-result v8

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v13

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v9, v0

    invoke-virtual {v9}, Lnbisdk/da;->ct()J

    move-result-wide v15

    sub-long/2addr v13, v15

    long-to-int v9, v13

    invoke-static/range {v2 .. v9}, Lnbisdk/et;->a(IIIIBLjava/lang/String;II)V

    goto :goto_2

    :cond_b
    const/4 v2, 0x1

    move v3, v2

    goto/16 :goto_1

    :cond_c
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fq()I

    move-result v2

    const/4 v3, 0x1

    if-ne v2, v3, :cond_10

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fs()Lnbisdk/pv;

    move-result-object v2

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    move-object v3, v0

    invoke-virtual {v3, v2}, Lnbisdk/fv;->a(Lnbisdk/eo;)V

    sget-boolean v2, Lnbisdk/bk;->cG:Z

    if-eqz v2, :cond_d

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fs()Lnbisdk/pv;

    move-result-object v2

    invoke-static {v2}, Lnbisdk/cq;->a(Lnbisdk/pv;)V

    :cond_d
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/qk;->fp()Ljava/util/List;

    move-result-object v2

    if-eqz v2, :cond_10

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v9

    :cond_e
    :goto_3
    invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_f

    invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    move-object v0, v2

    check-cast v0, Landroid/telephony/NeighboringCellInfo;

    move-object v8, v0

    invoke-virtual {v8}, Landroid/telephony/NeighboringCellInfo;->getCid()I

    move-result v6

    invoke-virtual {v8}, Landroid/telephony/NeighboringCellInfo;->getLac()I

    move-result v5

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    move-object v10, v0

    new-instance v2, Lnbisdk/pv;

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-virtual {v8}, Landroid/telephony/NeighboringCellInfo;->getRssi()I

    move-result v7

    invoke-direct/range {v2 .. v7}, Lnbisdk/pv;-><init>(IIIII)V

    invoke-virtual {v10, v2}, Lnbisdk/fv;->a(Lnbisdk/eo;)V

    sget-boolean v2, Lnbisdk/bk;->cG:Z

    if-eqz v2, :cond_e

    new-instance v2, Lnbisdk/pv;

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-virtual {v8}, Landroid/telephony/NeighboringCellInfo;->getRssi()I

    move-result v7

    invoke-direct/range {v2 .. v7}, Lnbisdk/pv;-><init>(IIIII)V

    invoke-static {v2}, Lnbisdk/cq;->a(Lnbisdk/pv;)V

    goto :goto_3

    :cond_f
    const/4 v2, 0x1

    move v3, v2

    goto/16 :goto_1

    :cond_10
    const/4 v2, 0x1

    move v3, v2

    goto/16 :goto_1

    :cond_11
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v2, v0

    if-eqz v2, :cond_15

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/da;->getWifiState()I

    move-result v2

    const/4 v4, 0x2

    if-ne v2, v4, :cond_15

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yW:Lnbisdk/da;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/da;->cv()Ljava/util/Vector;

    move-result-object v2

    move-object v0, v2

    move-object/from16 v1, p0

    iput-object v0, v1, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object v2, v0

    if-eqz v2, :cond_15

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object v2, v0

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :goto_4
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_12

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lnbisdk/rm;

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    move-object v5, v0

    invoke-virtual {v2}, Lnbisdk/rm;->getMacAddress()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v2}, Lnbisdk/rm;->kS()I

    move-result v2

    invoke-virtual {v5, v6, v2}, Lnbisdk/fv;->a(Ljava/lang/String;I)V

    goto :goto_4

    :cond_12
    const/4 v2, 0x1

    :goto_5
    if-nez v2, :cond_13

    if-eqz v3, :cond_18

    :cond_13
    const/4 v2, 0x0

    invoke-static {v2}, Lnbisdk/gz;->f(Lcom/nbi/common/NBIContext;)Lnbisdk/gz;

    move-result-object v2

    if-eqz v2, :cond_17

    invoke-virtual {v2}, Lnbisdk/gz;->fv()Lnbisdk/ge;

    move-result-object v2

    if-eqz v2, :cond_17

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    move-object v3, v0

    invoke-virtual {v3}, Lnbisdk/qk;->fr()Lnbisdk/cb;

    move-result-object v3

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object v4, v0

    invoke-virtual {v2, v3, v4}, Lnbisdk/ge;->a(Lnbisdk/cb;Ljava/util/List;)Z

    move-result v4

    const/4 v5, 0x1

    if-eq v4, v5, :cond_16

    invoke-virtual {v2}, Lnbisdk/ge;->fj()Lcom/nbi/location/Location;

    move-result-object v3

    if-eqz v3, :cond_17

    invoke-virtual {v2}, Lnbisdk/ge;->fj()Lcom/nbi/location/Location;

    move-result-object v2

    move-object v0, v2

    move-object/from16 v1, p0

    iput-object v0, v1, Lnbisdk/rw;->cp:Lcom/nbi/location/Location;

    const/4 v2, 0x0

    move-object v0, v2

    move-object/from16 v1, p0

    iput-object v0, v1, Lnbisdk/rw;->yR:Lnbisdk/fv;

    invoke-static {}, Lnbisdk/gi;->fk()Lnbisdk/gi;

    move-result-object v2

    if-eqz v2, :cond_14

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yU:Ljava/lang/Runnable;

    move-object v3, v0

    invoke-virtual {v2, v3}, Lnbisdk/gi;->a(Ljava/lang/Runnable;)V

    :cond_14
    const/4 v2, 0x1

    goto/16 :goto_0

    :cond_15
    const/4 v2, 0x0

    goto :goto_5

    :cond_16
    invoke-virtual {v2, v3}, Lnbisdk/ge;->b(Lnbisdk/cb;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yS:Ljava/util/List;

    move-object v3, v0

    invoke-virtual {v2, v3}, Lnbisdk/ge;->a(Ljava/util/List;)V

    :cond_17
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    move-object v2, v0

    invoke-virtual {v2}, Lnbisdk/fv;->startRequest()V

    const/4 v2, 0x1

    goto/16 :goto_0

    :cond_18
    const/4 v2, 0x0

    move-object v0, v2

    move-object/from16 v1, p0

    iput-object v0, v1, Lnbisdk/rw;->yR:Lnbisdk/fv;

    const/16 v2, 0x2346

    move-object/from16 v0, p0

    move v1, v2

    invoke-virtual {v0, v1}, Lnbisdk/rw;->onLocationError(I)V

    const/4 v2, 0x0

    goto/16 :goto_0
.end method

.method public final c(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationListener;)V
    .locals 2

    if-eqz p1, :cond_0

    if-nez p2, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    iput-object p2, p0, Lnbisdk/ct;->el:Lcom/nbi/location/LocationListener;

    iput-object p1, p0, Lnbisdk/rw;->yQ:Lcom/nbi/common/NBIContext;

    iget-object v0, p0, Lnbisdk/rw;->yQ:Lcom/nbi/common/NBIContext;

    invoke-static {v0}, Lnbisdk/da;->e(Lcom/nbi/common/NBIContext;)Lnbisdk/da;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/rw;->yW:Lnbisdk/da;

    iget-object v0, p0, Lnbisdk/rw;->yW:Lnbisdk/da;

    invoke-virtual {v0}, Lnbisdk/da;->getWifiState()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_2

    iget-object v0, p0, Lnbisdk/rw;->yW:Lnbisdk/da;

    invoke-virtual {v0}, Lnbisdk/da;->cu()Z

    :cond_2
    :try_start_0
    iget-object v0, p0, Lnbisdk/rw;->yQ:Lcom/nbi/common/NBIContext;

    invoke-static {v0}, Lnbisdk/gz;->f(Lcom/nbi/common/NBIContext;)Lnbisdk/gz;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/gz;->fx()Lnbisdk/qk;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    iget-object v0, p0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lnbisdk/rw;->yV:Lnbisdk/qk;

    iget-object v0, p0, Lnbisdk/rw;->yQ:Lcom/nbi/common/NBIContext;

    invoke-virtual {v0}, Lcom/nbi/common/NBIContext;->getInternalObject()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/bl;

    invoke-virtual {v0}, Lnbisdk/bl;->jw()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v1, v0}, Lnbisdk/qk;->c(Landroid/content/Context;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const/16 v0, 0x2346

    invoke-virtual {p0, v0}, Lnbisdk/rw;->onLocationError(I)V

    goto :goto_0
.end method

.method public final cancel()V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    return-void
.end method

.method public final jO()Z
    .locals 1

    iget-object v0, p0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/rw;->yR:Lnbisdk/fv;

    invoke-virtual {v0}, Lnbisdk/fv;->isRequestInProgress()Z

    move-result v0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method
